Skip to content

active_record_composite_primary_keys.mdの欠落箇所を修正#1824

Merged
yasulab merged 1 commit intoyasslab:masterfrom
yujikuroki:patch-1
Feb 3, 2025
Merged

active_record_composite_primary_keys.mdの欠落箇所を修正#1824
yasulab merged 1 commit intoyasslab:masterfrom
yujikuroki:patch-1

Conversation

@yujikuroki
Copy link

概要

英語原文

Composite key parameters contain multiple values in one parameter. For this reason, we need to be able to extract each value and pass them to Active Record. We can leverage the extract_value method for this use-case.

リンク

「Action Controller の概要」ページ「複合主キーのパラメータ」セクションの説明文

複合キーパラメータは、1個のパラメータに複数の値を含み、値同士は区切り文字(アンダースコアなど)で区切られます。したがって、Active Recordに渡すには個別の値を抽出する必要があります。これを行うには、extract_valueメソッドを使います。

リンク


Railsガイドいつもありがたく活用させていただいております。皆様ありがとうございます 🙏

@yasulab yasulab requested a review from hachi8833 February 3, 2025 16:57
@yasulab
Copy link
Member

yasulab commented Feb 3, 2025

修正PRありがとうございます...!! 助かります!! 🙏 💖 ✨

@yasulab yasulab merged commit d208263 into yasslab:master Feb 3, 2025
2 checks passed
@hachi8833
Copy link
Collaborator

修正ありがとうございます!v7.2とv7.1にも反映します。

hachi8833 added a commit that referenced this pull request Feb 4, 2025
active_record_composite_primary_keys.mdを修正

#1824
hachi8833 added a commit that referenced this pull request Feb 4, 2025
active_record_composite_primary_keys.md

#1824
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants